<?php
//获取参数
$os_id  = $route->bodyParams["os_id"];//主键ID
$number = $route->bodyParams["number"];
$action = $route->bodyParams["action"];

//更新条件
$whereArr = [
    "os_id" => $os_id
];

//执行写入语句
if($action == 'add'){
    $rsData = $db->mysqlDB->updateInc("oa_student",$whereArr,"os_surplus_class_hour",$number);
}else{
    $rsData = $db->mysqlDB->updateReduce("oa_student",$whereArr,"os_surplus_class_hour",$number);
}


//返回成功结果
$response->responseData( true, $rsData );